interface actionType {
  type: string;
  payload: boolean;
}

export const UserReducer = (
  prevState = {
    Login: false,
  },
  action: actionType
) => {
  let { type, payload } = action;

  switch (type) {
    case "change_Login":
      let newState = { ...prevState };
      newState.Login = payload;
      return newState;
    default:
      return prevState;
  }
};
